package com.jindun.paper.dao;

import java.util.Date;
import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import com.jindun.paper.model.Client;
import com.jindun.paper.model.Order;
import com.jindun.paper.model.Users;

public interface OrderRepository extends JpaRepository<Order, Integer> {
	List<Order> findByClientAndStatusAndCreateDateBetween (Client client, String status, Date startDate, Date endDate);
	List<Order> findByOrderTypeAndCreatorOrderByCreateDate(String orderType, Users user);
	List<Order> findByOrderTypeOrderByCreateDateDesc(String orderType);
	List<Order> findByOrderTypeAndCreatorIdOrderByCreateDateDesc(String orderType, Integer creatorId);
}
